package com.sean.stock.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class ProductController {
    @Value("${server.port}")
    private String port;

    @RequestMapping("get/{id}")
    private String getProductById(@PathVariable("id") Integer id){
        System.out.println("ProductController: 查询商品：" + id);
        return "ProductController: port: " + port + ", id: " + id;
    }
}
